﻿<!DOCTYPE html>
<html manifest="AjaxRequest.ashx?cache=1">
<head>
    <title>MyFavorites Management</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
    <link href="Scripts/default.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="Scripts/CommonFunction.js" type="text/javascript"></script>
    <script src="Scripts/jquery.artDialog.min.js" type="text/javascript"></script>
    <script src="Scripts/EditPageFunction.js" type="text/javascript"></script>

    <script type="text/javascript">
        window.onload = function () {
            if ('localStorage' in window && window['localStorage'] !== null) {
                CreateTypeSelectOption();
                CreateUrlListSelectOption();
            }

            $.dialog({
                content: document.getElementById("div_Modify"),
                title: "链接管理",
                cancel: false,
                button: [
                    {
                        id: "btn_DownloanDataToClient",
                        value: "下载备份",
                        disabled: true,
                        callback: function () { DataSync(false); return false; }
                    },
                    {
                        id: "btn_UploadDataToServer",
                        value: "上传备份",
                        disabled: true,
                        callback: function () { DataSync(true); return false; }
                    }, {
                        value: "恢复默认",
                        disabled: false,
                        callback: function () {
                            localStorage.clear();
                            location.href = "index.html";
                        }
                    }, {
                        value: "回到主页",
                        focus: true,
                        callback: function () {
                            location.href = "index.html";
                        }
                    }
                ]
            });
        }
    </script>
</head>
<body>
<div id="div_Modify" style="display:none;">
    <table>
        <thead>
            <tr>
                <th colspan="2"></th>
                <th colspan="2"></th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <input type="button" value="增加" onclick="btnTypeModify_AddClick()" /><br />
                    <input type="button" value="修改" onclick="btnTypeModify_EditClick()" /><br />
                    <input type="button" value="删除" onclick="btnTypeModify_DeleteClick()" /><br />
                    <input type="button" value="上移" onclick="btnTypeModify_UpClick()" title="把类别向上移动&#10;下移:可以通过把下面的类别上移实现" /><br />
                </td>
                <td>
                    <select id="select_Type_All" size="30" onchange="" style="width:400px;"></select>
                </td>
                <td>
                    <input type="button" value="增加" onclick="btnURLModify_AddClick()" /><br />
                    <input type="button" value="修改" onclick="btnURLModify_ModifyClick()" /><br />
                    <input type="button" value="删除" onclick="btnURLModify_DeleteClick()" /><br />
                    <input type="button" value="上移" onclick="btnURLModify_MoveUpClick()" title="把链接向上移动&#10;下移:可以通过把下面的链接上移实现" /><br />
                    <input type="button" value="移动" onclick="btnURLModify_MoveTypeClick()" title="把右边的链接移动到左边不同的一个类别中" /><br />
                </td>
                <td>
                    <select id="select_URL_List" size="30" style="width:400px;"></select>
                </td>
            </tr>
        </tbody>
    </table>
</div>
<div id="div_Modify_Type" style="display:none;">
    <table>
        <tbody>
            <tr>
                <td>类别名称:</td>
                <td><input id="txtTypeName" type="text" /><input id="hidTypeID" type="hidden" /></td>
            </tr>
        </tbody>
    </table>
</div>
<div id="div_Modify_URL" style="display:none;">
    <table>
        <tbody>
            <tr>
                <td>类别名称:</td>
                <td><select id="selectType_Url"></select></td>
            </tr>
            <tr>
                <td>链接名称:</td>
                <td><input id="txtURLName" type="text" /><input id="hidURLID" type="hidden" /></td>
            </tr>
            <tr>
                <td>链接地址:</td>
                <td><input id="txtURLAddress" type="text" /></td>
            </tr>
        </tbody>
    </table>
</div>
</body>
</html>